<?php
class Menu_Model_Menu extends Zend_Db_Table{
	protected $_name = 'menu';
	protected $_primary = 'menu_id';

	/* select */
	public function selectMenuItemByParentId($parent_id,$language)
	{ // co dung
		$client = new Zend_Rest_Client(HTTP_SERVICE);
		$return = $client->restGet("/menu/route/selectMenuItemByParentId/parent_id/".$parent_id."/language_id/".$language);
		$return = json_decode(json_encode((array) simplexml_load_string($return->getBody())),1);
		
		for ($i=0;$i <count($return);$i++)
				$data[$i] = $return['row_'.$i];
		
		return $data;		
	}
		
}
?>